package com.vhr.util;

import com.github.pagehelper.PageInfo;
import com.vhr.VO.EmployeeVO;
import com.vhr.entities.MyPageInfo;

public class PageUtil {

    public static MyPageInfo MyPageInfoUtil(PageInfo pageInfo){
        MyPageInfo<?> myPageInfo = new MyPageInfo<>();
        myPageInfo.setPageNum(pageInfo.getPageNum());
        myPageInfo.setPageSize(pageInfo.getPageSize());
        myPageInfo.setRecordCount((int) pageInfo.getTotal());
        myPageInfo.setList(pageInfo.getList());
        myPageInfo.setTotalPage(pageInfo.getPages());
        return myPageInfo;
    }


}
